//
//  JSLAboutUsController.m
//  JingleSpeedLoan
//
//  Created by 宋志彬 on 2018/7/31.
//  Copyright © 2018年 宋质彬. All rights reserved.
//

#import "JSLAboutUsController.h"
#import "AppConfig.h"
@interface JSLAboutUsController ()

@end

@implementation JSLAboutUsController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title = @"关于我们";
    
    [self baseConfig:PageGobackTypePop];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    [JSLKitFactory jsl_viewWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 10*AutoSizeScaleYY) backgroundColor:BACKGROUND_COLOR superView:self.view];
    
    UIImageView *logoImageView = [JSLKitFactory jsl_imageViewWithFrame:CGRectMake(SCREEN_WIDTH*0.5-100*AutoSizeScaleXX*0.5, 40*AutoSizeScaleYY, 100*AutoSizeScaleXX, 100*AutoSizeScaleXX) imageName:@"Logo-1024" superView:self.view];
    
    logoImageView.layer.mask = [JSLKitFactory roundedRect:logoImageView.bounds cornerRadius:10*AutoSizeScaleXX]
    ;//    logoImageView.backgroundColor = [UIColor redColor];
    
    
    NSString *sre =@"";
    if ([AppConfig shareConfig].audit) {
        sre = @"       叮当账单是一款纯线上记帐的平台。可以添加任意记账平台，并进行账单的记录，帮助用户清晰地记录每一笔网上账单记录，并及时提醒用户还款，保障用户良好的信用记录。为打造良好信用生活贡献自己的力量";
    }else {
        sre =@"        叮当账单是一款纯线上DK产品的垂直信息匹配共享平台。";
    }
    UILabel *contentLabel = [JSLKitFactory jsl_labelWithFrame:CGRectZero text:sre font:LIGHT_FONT(12) textColor:[@"#666666" hexStringToColor] textAlignment:NSTextAlignmentLeft SuperView:self.view];
    contentLabel.numberOfLines = 0;
    
  
    NSDictionary*attribute1 =@{NSFontAttributeName:contentLabel.font};
    CGSize contentSize  = [contentLabel.text boundingRectWithSize:CGSizeMake(SCREEN_WIDTH  -21*AutoSizeScaleXX*2 , MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attribute1 context:nil].size;
    
    contentLabel.frame = CGRectMake(21*AutoSizeScaleXX, logoImageView.bottom +29*AutoSizeScaleYY, contentSize.width, contentSize.height);
    
    
    
    UILabel *bootomlab = [JSLKitFactory jsl_labelWithFrame:CGRectZero text:@"Copyright© 2017-2019 上海蜂筹信息科技有限公司 沪ICP备17043546号-1" font:LIGHT_FONT(10) textColor:[@"#999999" hexStringToColor] textAlignment:NSTextAlignmentCenter SuperView:self.view];
    
    CGSize labSize = [bootomlab.text sizeWithAttributes:@{NSFontAttributeName : bootomlab.font}];
    
    bootomlab.frame = CGRectMake(0, self.view.height -labSize.height-64 -15*AutoSizeScaleYY, SCREEN_WIDTH, labSize.height);
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
